3.25 \(\int \sec ^m(e+f x) (m-(1+m) \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=21 \[ -\frac {\sin (e+f x) \sec ^{m+1}(e+f x)}{f} \]

[Out]

-sec(f*x+e)^(1+m)*sin(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {4043} \[ -\frac {\sin (e+f x) \sec ^{m+1}(e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^m*(m - (1 + m)*Sec[e + f*x]^2),x]

[Out]

-((Sec[e + f*x]^(1 + m)*Sin[e + f*x])/f)

Rule 4043

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] /; FreeQ[{b, e, f, A, C, m}, x] && EqQ[C*m + A*(m + 1), 0]

Rubi steps

\begin {align*} \int \sec ^m(e+f x) \left (m-(1+m) \sec ^2(e+f x)\right ) \, dx &=-\frac {\sec ^{1+m}(e+f x) \sin (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.33, size = 21, normalized size = 1.00 \[ -\frac {\sin (e+f x) \sec ^{m+1}(e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^m*(m - (1 + m)*Sec[e + f*x]^2),x]

[Out]

-((Sec[e + f*x]^(1 + m)*Sin[e + f*x])/f)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 29, normalized size = 1.38 \[ -\frac {\frac {1}{\cos \left (f x + e\right )}^{m} \sin \left (f x + e\right )}{f \cos \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^m*(m-(1+m)*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

-(1/cos(f*x + e))^m*sin(f*x + e)/(f*cos(f*x + e))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -{\left ({\left (m + 1\right )} \sec \left (f x + e\right )^{2} - m\right )} \sec \left (f x + e\right )^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^m*(m-(1+m)*sec(f*x+e)^2),x, algorithm="giac")

[Out]

integrate(-((m + 1)*sec(f*x + e)^2 - m)*sec(f*x + e)^m, x)

________________________________________________________________________________________

maple [C]  time = 1.53, size = 506, normalized size = 24.10 \[ \frac {i \left (\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{-m} \left ({\mathrm e}^{i \left (\Re \left (f x \right )+\Re \relax (e )\right )}\right )^{m} 2^{m} {\mathrm e}^{-m \Im \left (f x \right )-m \Im \relax (e )} {\mathrm e}^{-\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3} m}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right ) m}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) m}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) m}{2}} {\mathrm e}^{2 i f x} {\mathrm e}^{2 i e}-\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{-m} \left ({\mathrm e}^{i \left (\Re \left (f x \right )+\Re \relax (e )\right )}\right )^{m} 2^{m} {\mathrm e}^{-\frac {m \left (i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3}-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right )-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )+i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )+2 \Im \relax (e )+2 \Im \left (f x \right )\right )}{2}}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^m*(m-(1+m)*sec(f*x+e)^2),x)

[Out]

I/f/(exp(2*I*(f*x+e))+1)*(1/((exp(2*I*(f*x+e))+1)^m)*exp(I*(Re(f*x)+Re(e)))^m*2^m*exp(-m*Im(f*x)-m*Im(e))*exp(
-1/2*I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3*m)*exp(1/2*I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e)
)+1))^2*csgn(I*exp(I*(f*x+e)))*m)*exp(1/2*I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I/(exp(2*I*(
f*x+e))+1))*m)*exp(-1/2*I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I/(exp(2*
I*(f*x+e))+1))*m)*exp(2*I*f*x)*exp(2*I*e)-1/((exp(2*I*(f*x+e))+1)^m)*exp(I*(Re(f*x)+Re(e)))^m*2^m*exp(-1/2*m*(
I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*e
xp(I*(f*x+e)))-I*Pi*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I/(exp(2*I*(f*x+e))+1))+I*Pi*csgn(I*exp
(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I/(exp(2*I*(f*x+e))+1))+2*Im(e)+2*Im(f*x))))

________________________________________________________________________________________

maxima [B]  time = 0.76, size = 283, normalized size = 13.48 \[ \frac {2^{m} \cos \left (-{\left (f x + e\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) \sin \left (2 \, f x + 2 \, e\right ) - 2^{m} \cos \left (-{\left (f x + e\right )} m + m \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) \sin \left (2 \, f x + 2 \, e\right ) + {\left (2^{m} \cos \left (2 \, f x + 2 \, e\right ) + 2^{m}\right )} \sin \left (-{\left (f x + e\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) - {\left (2^{m} \cos \left (2 \, f x + 2 \, e\right ) + 2^{m}\right )} \sin \left (-{\left (f x + e\right )} m + m \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right )}{{\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{2} \, m} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^m*(m-(1+m)*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

(2^m*cos(-(f*x + e)*(m + 2) + m*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1))*sin(2*f*x + 2*e) - 2^m*cos(-(
f*x + e)*m + m*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1))*sin(2*f*x + 2*e) + (2^m*cos(2*f*x + 2*e) + 2^m
)*sin(-(f*x + e)*(m + 2) + m*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - (2^m*cos(2*f*x + 2*e) + 2^m)*s
in(-(f*x + e)*m + m*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)))/((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^
2 + 2*cos(2*f*x + 2*e) + 1)*(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/2*m)*f)

________________________________________________________________________________________

mupad [B]  time = 2.75, size = 37, normalized size = 1.76 \[ -\frac {\sin \left (2\,e+2\,f\,x\right )\,{\left (\frac {1}{\cos \left (e+f\,x\right )}\right )}^m}{f\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((m - (m + 1)/cos(e + f*x)^2)*(1/cos(e + f*x))^m,x)

[Out]

-(sin(2*e + 2*f*x)*(1/cos(e + f*x))^m)/(f*(cos(2*e + 2*f*x) + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \int \left (- m \sec ^{m}{\left (e + f x \right )}\right )\, dx - \int \sec ^{2}{\left (e + f x \right )} \sec ^{m}{\left (e + f x \right )}\, dx - \int m \sec ^{2}{\left (e + f x \right )} \sec ^{m}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**m*(m-(1+m)*sec(f*x+e)**2),x)

[Out]

-Integral(-m*sec(e + f*x)**m, x) - Integral(sec(e + f*x)**2*sec(e + f*x)**m, x) - Integral(m*sec(e + f*x)**2*s
ec(e + f*x)**m, x)

________________________________________________________________________________________